.euiLoadingElastic {
  position: relative;
  display: inline-block;
}

.euiLoadingElastic--medium {
  width: $euiSize;
}

.euiLoadingElastic--large {
  width: $euiSizeL;
}

.euiLoadingElastic--xLarge {
  width: $euiSizeXL;
}

.euiLoadingElastic--xxLarge {
  width: $euiSizeXXL;
}

.euiLoadingElastic path {
  animation-name: euiLoadingElastic;
  animation-fill-mode: forwards;
  animation-direction: alternate;
  transform-style: preserve-3d;
  animation-duration: 1s;
  animation-timing-function: cubic-bezier(0, 0.63, 0.49, 1);
  animation-iteration-count: infinite;
  transform-origin: 50% 50%;
}

.euiLoadingElastic path:nth-of-type(1) {
  animation-delay: 0s;
}

.euiLoadingElastic path:nth-of-type(2) {
  animation-delay: 0.035s;
}

.euiLoadingElastic path:nth-of-type(3) {
  animation-delay: 0.125s;
}

.euiLoadingElastic path:nth-of-type(4) {
  animation-delay: 0.155s;
}

.euiLoadingElastic path:nth-of-type(5) {
  animation-delay: 0.075s;
}

.euiLoadingElastic path:nth-of-type(6) {
  animation-delay: 0.06s;
}

@keyframes euiLoadingElastic {
  0% {
    transform: scale3d(0, 0, -0.7);
    opacity: 0;
  }

  40% {
    transform: scale3d(1, 1, 2);
    opacity: 1;
  }

  50% {
    transform: scale3d(0.99, 0.99, 2);
  }

  70% {
    transform: scale3d(0.96, 0.96, -2.5);
  }

  100% {
    transform: scale3d(0.98, 0.98, 2);
  }
}
